#include"Binding.h"
#include<utility>
#include<vector>
#include<list>
#include<set>

#ifndef _NTUPLE_H_
#define _NTUPLE_H_

class NTuple{
public:
//	NTuple(std::vector<Binding> b);
	NTuple(const NTuple &t);
	NTuple();
	~NTuple();
	void addBinding(Binding b);
	std::vector<Binding> getBindings();
	bool hasBinding(int index);
	Binding getBinding(int index);
	int getSize();
	bool isEmpty();
	Binding getBinding(std::string variableName);
	std::set<std::string> getAllVariables();
	bool isContain(std::string variable); // 查看是否在绑定中存在某个变量
	std::string toString();
	void removeBinding(int i);
	void project(std::vector<std::string> answerVars);
	void addBinding(int index,Binding binding);
	bool isCompatible(NTuple ntuple);

public:
	std::vector<Binding> bindings;
	std::set<std::string> variables;
};




#endif // _NTUPLE_H_
